Skip to content

Support predicate_id and mapping_justification being propagatable - #20

Open
gouttegd wants to merge 5 commits into
mainfrom
make-predicate-id-propagatable
Open

gouttegd wants to merge 5 commits into
mainfrom
make-predicate-id-propagatable

Conversation

@gouttegd

@gouttegd gouttegd commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

There is an ongoing discussion in the SSSOM spec about making predicate_id and mapping_justification propagatable.

This PR supports them being propagatable but with the caveat that their condensation is strongly discouraged: they are always propagated when reading a set, but never condensed when writing, unless this is explicitly asked for.

gouttegd and others added 5 commits September 25, 2026 16:25
With the recent changes to the Java generator in LinkML-Py,
EntityReference-typed slots are no longer automatically mapped to
String - they are mapped to URI instead. We need to explicitly override
that.
The SSSOM spec may (or not…) soon mark some slots as being propagatable
while recommending against their condensation.

We support this by making the `Propagatable` field annotation accept an
optional boolean parameter (`condensationDiscouraged`). A slot marked
with `Propagatable(condensationDiscouraged=true)` will always be
propagated as any other propagatable slot, but by default will not be
condensed.
Add a mechanism to mark slots whose condensation is to be discouraged
directly within the SSSOM schema. Update the Java generator and the
template accordingly to exploit that annotation when present.
As currently under discussion in the SSSOM spec, we mark the
predicate_id and mapping_justification slots (as well as the
predicate_label slot) as being propagatable but with the caveat that
their condensation is discouraged.
Add a `setForceCondensation()` method to SSSOMWriter to allow client
code to force the writer to condense all propagatable slots, even those
that should not be condensed. The default behaviour remains not to
condense those slots.

Also expose that settings to the command line tool, in the form of a new
option `--condense-all-slots`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant